
const $: (id: string) => HTMLElement | null = function(id) {
    return document.getElementById(id) as HTMLElement | null;
};
 
//将函数赋值给一个变量
const sayHello: (name: string) => string = function(name) {
    alert(name)
    return `Hello from ${name}`;
};


export {$,sayHello}
